/*
 Navicat Premium Dump SQL

 Source Server         : 127.0.0.1-pgvector17
 Source Server Type    : PostgreSQL
 Source Server Version : 170000 (170000)
 Source Host           : 127.0.0.1:5437
 Source Catalog        : nacos
 Source Schema         : public

 Target Server Type    : PostgreSQL
 Target Server Version : 170000 (170000)
 File Encoding         : 65001

 Date: 22/10/2024 09:22:27
*/


-- ----------------------------
-- Table structure for config_info
-- ----------------------------
DROP TABLE IF EXISTS "public"."config_info";
CREATE TABLE "public"."config_info" (
  "id" int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1
),
  "data_id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "group_id" varchar(128) COLLATE "pg_catalog"."default",
  "content" text COLLATE "pg_catalog"."default" NOT NULL,
  "md5" varchar(32) COLLATE "pg_catalog"."default",
  "gmt_create" timestamp(6) NOT NULL,
  "gmt_modified" timestamp(6) NOT NULL,
  "src_user" text COLLATE "pg_catalog"."default",
  "src_ip" varchar(50) COLLATE "pg_catalog"."default",
  "app_name" varchar(128) COLLATE "pg_catalog"."default",
  "tenant_id" varchar(128) COLLATE "pg_catalog"."default",
  "c_desc" varchar(256) COLLATE "pg_catalog"."default",
  "c_use" varchar(64) COLLATE "pg_catalog"."default",
  "effect" varchar(64) COLLATE "pg_catalog"."default",
  "type" varchar(64) COLLATE "pg_catalog"."default",
  "c_schema" text COLLATE "pg_catalog"."default",
  "encrypted_data_key" varchar(1024) COLLATE "pg_catalog"."default" NOT NULL
)
;
COMMENT ON COLUMN "public"."config_info"."id" IS 'id';
COMMENT ON COLUMN "public"."config_info"."data_id" IS 'data_id';
COMMENT ON COLUMN "public"."config_info"."group_id" IS 'group_id';
COMMENT ON COLUMN "public"."config_info"."content" IS 'content';
COMMENT ON COLUMN "public"."config_info"."md5" IS 'md5';
COMMENT ON COLUMN "public"."config_info"."gmt_create" IS '创建时间';
COMMENT ON COLUMN "public"."config_info"."gmt_modified" IS '修改时间';
COMMENT ON COLUMN "public"."config_info"."src_user" IS 'source user';
COMMENT ON COLUMN "public"."config_info"."src_ip" IS 'source ip';
COMMENT ON COLUMN "public"."config_info"."app_name" IS 'app_name';
COMMENT ON COLUMN "public"."config_info"."tenant_id" IS '租户字段';
COMMENT ON COLUMN "public"."config_info"."c_desc" IS 'configuration description';
COMMENT ON COLUMN "public"."config_info"."c_use" IS 'configuration usage';
COMMENT ON COLUMN "public"."config_info"."effect" IS '配置生效的描述';
COMMENT ON COLUMN "public"."config_info"."type" IS '配置的类型';
COMMENT ON COLUMN "public"."config_info"."c_schema" IS '配置的模式';
COMMENT ON COLUMN "public"."config_info"."encrypted_data_key" IS '密钥';
COMMENT ON TABLE "public"."config_info" IS 'config_info';

-- ----------------------------
-- Records of config_info
-- ----------------------------
INSERT INTO "public"."config_info" VALUES (17, 'gateway.yml', 'DEFAULT_GROUP', 'spring:
  cloud:
    gateway:
      discovery:
        locator:
          lowerCaseServiceId: true
          enabled: true
      routes:
        # 认证中心
        - id: auth
          uri: lb://auth
          predicates:
            - Path=/auth/**
          filters:
            # 验证码处理
            - CacheRequestFilter
            - ValidateCodeFilter
            - StripPrefix=1
        # 代码生成
        - id: gen-code
          uri: lb://gen-code
          predicates:
            - Path=/code/**
          filters:
            - StripPrefix=1
        # 定时任务
        - id: job
          uri: lb://job
          predicates:
            - Path=/schedule/**
          filters:
            - StripPrefix=1
        # 系统模块
        - id: system
          uri: lb://system
          predicates:
            - Path=/system/**
          filters:
            - StripPrefix=1
        # 文件服务
        - id: file
          uri: lb://file
          predicates:
            - Path=/file/**
          filters:
            - StripPrefix=1

# 安全配置
security:
  # 验证码
  captcha:
    enabled: true
    type: math
  # 防止XSS攻击
  xss:
    enabled: true
    excludeUrls:
      - /system/notice

  # 不校验白名单
  ignore:
    whites:
      - /auth/logout
      - /auth/login
      - /auth/register
      - /*/v2/api-docs
      - /*/v3/api-docs
      - /csrf

', '9c5ae85b1ec9d4e3edca54a12958bd41', '2024-10-21 19:42:29.936026', '2024-10-21 19:42:29.936026', 'nacos', '172.70.100.1', '', 'ruoyi', NULL, NULL, NULL, 'yaml', NULL, '');
INSERT INTO "public"."config_info" VALUES (20, 'sentinel-gateway', 'DEFAULT_GROUP', '[
    {
        "resource": "auth",
        "count": 500,
        "grade": 1,
        "limitApp": "default",
        "strategy": 0,
        "controlBehavior": 0
    },
	{
        "resource": "system",
        "count": 1000,
        "grade": 1,
        "limitApp": "default",
        "strategy": 0,
        "controlBehavior": 0
    },
	{
        "resource": "gen-code",
        "count": 200,
        "grade": 1,
        "limitApp": "default",
        "strategy": 0,
        "controlBehavior": 0
    },
	{
        "resource": "job",
        "count": 300,
        "grade": 1,
        "limitApp": "default",
        "strategy": 0,
        "controlBehavior": 0
    }
]', '33d87a8946b8d3a0f51a9c9e08594c7e', '2024-10-21 19:42:33.027041', '2024-10-21 19:42:33.027041', 'nacos', '172.70.100.1', '', 'ruoyi', NULL, NULL, NULL, 'text', NULL, '');
INSERT INTO "public"."config_info" VALUES (18, 'file.yml', 'DEFAULT_GROUP', '# 本地文件上传
file:
    domain: http://127.0.0.1:9300
    path: D:/ruoyi/uploadPath
    prefix: /statics

# FastDFS配置
fdfs:
  domain: http://8.129.231.12
  soTimeout: 3000
  connectTimeout: 2000
  trackerList: 8.129.231.12:22122

# Minio配置
minio:
  url: http://127.0.0.1:9000
  accessKey: JWuj8ipa6Ns2To5nwF3S
  secretKey: sT6jIXUejLrSd8SeGFwWfHQkNAgMbuNMmycKCrvf
  bucketName: test', '371ea3b4790ea46cb3cf0f7bf401a733', '2024-10-21 19:42:31.845431', '2024-10-21 19:42:50.952794', 'nacos', '172.70.100.1', '', 'ruoyi', '', '', '', 'yaml', '', '');
INSERT INTO "public"."config_info" VALUES (19, 'application-dev.yml', 'DEFAULT_GROUP', 'spring:
  autoconfigure:
    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
  data:
    redis:
      host: ${REDIS_URL:127.0.0.1}
      port: ${REDIS_PORT:6379}
      password:
  datasource:
    # 单数据源模块使用（gen代码生成、job定时任务等模块）
    # driver-class-name: com.mysql.cj.jdbc.Driver
    # url: jdbc:mysql://${DB_URL:127.0.0.1}:${DB_PORT:3306}6/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai
    # username: ${DB_USERNAME:root}
    # password: ${DB_PASSWORD:123456}
    driver-class-name: org.postgresql.Driver
    url: jdbc:postgresql://${DB_URL:127.0.0.1}:${DB_PORT:5437}/ry-cloud?tcpKeepAlive=true&reWriteBatchedInserts=true
    username: ${DB_USERNAME:postgres}
    password: ${DB_PASSWORD:postgres}
    druid:
      stat-view-servlet:
        enabled: false
        # loginUsername: gitee
        # loginPassword: !@#456
    dynamic:
      druid:
        initial-size: 1
        min-idle: 2
        maxActive: 20
        maxWait: 60000
        connectTimeout: 30000
        socketTimeout: 60000
        timeBetweenEvictionRunsMillis: 60000
        minEvictableIdleTimeMillis: 300000
        validationQuery: SELECT 1
        testWhileIdle: true
        testOnBorrow: false
        testOnReturn: false
        poolPreparedStatements: true
        maxPoolPreparedStatementPerConnectionSize: 20
        filters: stat,slf4j
        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
      datasource:
          # 主库数据源
          master:
            # driver-class-name: com.mysql.cj.jdbc.Driver
            # url: jdbc:mysql://${DB_URL:127.0.0.1}:${DB_PORT:3306}6/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai
            # username: ${DB_USERNAME:root}
            # password: ${DB_PASSWORD:123456}
            driver-class-name: org.postgresql.Driver
            url: jdbc:postgresql://${DB_URL:127.0.0.1}:${DB_PORT:5437}/ry-cloud?tcpKeepAlive=true&reWriteBatchedInserts=true
            username: ${DB_USERNAME:postgres}
            password: ${DB_PASSWORD:postgres}
          # 从库数据源
          # slave:
            # username:
            # password:
            # url:
            # driver-class-name:

# mybatis-plus配置
mybatis-plus:
  type-aliases-package: com.ruoyi.**.domain
  configuration:
    auto-page-helper: true
    # 如果项目无日志框架，可以考虑指定为 org.apache.ibatis.logging.stdout.StdOutImpl (请勿在实际生产中使用).
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  global-config:
    db-config:
      # 主键类型
      # AUTO 数据库ID自增
      # NONE 空
      # INPUT 用户输入ID
      # ASSIGN_ID 雪花ID
      # ASSIGN_UUID 全局唯一ID UUID
      id-type: ASSIGN_ID

# logging:
#   level:
#     com.ruoyi.system.mapper: debug

# springdoc配置
springdoc:
  gatewayUrl: http://localhost:8080/${spring.application.name}
  api-docs:
    # 是否开启接口文档
    enabled: true
  info:
    # 标题
    title: ''系统模块接口文档''
    # 描述
    description: ''系统模块接口描述''
    # 作者信息
    contact:
      name: gitee
      url: https://www.gitee.com



# feign 配置
feign:
  sentinel:
    enabled: true
  okhttp:
    enabled: true
  httpclient:
    enabled: false
  client:
    config:
      default:
        connectTimeout: 10000
        readTimeout: 10000
  compression:
    request:
      enabled: true
      min-request-size: 8192
    response:
      enabled: true

# 暴露监控端点
management:
  endpoints:
    web:
      exposure:
        include: ''*''
', 'e2db9bdd1047d75cdfbdf10ae2e793af', '2024-10-21 19:42:32.296691', '2024-10-21 19:43:02.034653', 'nacos', '172.70.100.1', '', 'ruoyi', '', '', '', 'yaml', '', '');

-- ----------------------------
-- Table structure for config_info_aggr
-- ----------------------------
DROP TABLE IF EXISTS "public"."config_info_aggr";
CREATE TABLE "public"."config_info_aggr" (
  "id" int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1
),
  "data_id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "group_id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
  "datum_id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "content" text COLLATE "pg_catalog"."default" NOT NULL,
  "gmt_modified" timestamp(6) NOT NULL,
  "app_name" varchar(128) COLLATE "pg_catalog"."default",
  "tenant_id" varchar(128) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."config_info_aggr"."id" IS 'id';
COMMENT ON COLUMN "public"."config_info_aggr"."data_id" IS 'data_id';
COMMENT ON COLUMN "public"."config_info_aggr"."group_id" IS 'group_id';
COMMENT ON COLUMN "public"."config_info_aggr"."datum_id" IS 'datum_id';
COMMENT ON COLUMN "public"."config_info_aggr"."content" IS '内容';
COMMENT ON COLUMN "public"."config_info_aggr"."gmt_modified" IS '修改时间';
COMMENT ON COLUMN "public"."config_info_aggr"."app_name" IS 'app_name';
COMMENT ON COLUMN "public"."config_info_aggr"."tenant_id" IS '租户字段';
COMMENT ON TABLE "public"."config_info_aggr" IS '增加租户字段';

-- ----------------------------
-- Records of config_info_aggr
-- ----------------------------

-- ----------------------------
-- Table structure for config_info_beta
-- ----------------------------
DROP TABLE IF EXISTS "public"."config_info_beta";
CREATE TABLE "public"."config_info_beta" (
  "id" int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1
),
  "data_id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "group_id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
  "app_name" varchar(128) COLLATE "pg_catalog"."default",
  "content" text COLLATE "pg_catalog"."default" NOT NULL,
  "beta_ips" varchar(1024) COLLATE "pg_catalog"."default",
  "md5" varchar(32) COLLATE "pg_catalog"."default",
  "gmt_create" timestamp(6) NOT NULL,
  "gmt_modified" timestamp(6) NOT NULL,
  "src_user" text COLLATE "pg_catalog"."default",
  "src_ip" varchar(50) COLLATE "pg_catalog"."default",
  "tenant_id" varchar(128) COLLATE "pg_catalog"."default",
  "encrypted_data_key" varchar(1024) COLLATE "pg_catalog"."default" NOT NULL
)
;
COMMENT ON COLUMN "public"."config_info_beta"."id" IS 'id';
COMMENT ON COLUMN "public"."config_info_beta"."data_id" IS 'data_id';
COMMENT ON COLUMN "public"."config_info_beta"."group_id" IS 'group_id';
COMMENT ON COLUMN "public"."config_info_beta"."app_name" IS 'app_name';
COMMENT ON COLUMN "public"."config_info_beta"."content" IS 'content';
COMMENT ON COLUMN "public"."config_info_beta"."beta_ips" IS 'betaIps';
COMMENT ON COLUMN "public"."config_info_beta"."md5" IS 'md5';
COMMENT ON COLUMN "public"."config_info_beta"."gmt_create" IS '创建时间';
COMMENT ON COLUMN "public"."config_info_beta"."gmt_modified" IS '修改时间';
COMMENT ON COLUMN "public"."config_info_beta"."src_user" IS 'source user';
COMMENT ON COLUMN "public"."config_info_beta"."src_ip" IS 'source ip';
COMMENT ON COLUMN "public"."config_info_beta"."tenant_id" IS '租户字段';
COMMENT ON COLUMN "public"."config_info_beta"."encrypted_data_key" IS '密钥';
COMMENT ON TABLE "public"."config_info_beta" IS 'config_info_beta';

-- ----------------------------
-- Records of config_info_beta
-- ----------------------------

-- ----------------------------
-- Table structure for config_info_tag
-- ----------------------------
DROP TABLE IF EXISTS "public"."config_info_tag";
CREATE TABLE "public"."config_info_tag" (
  "id" int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1
),
  "data_id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "group_id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
  "tenant_id" varchar(128) COLLATE "pg_catalog"."default",
  "tag_id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
  "app_name" varchar(128) COLLATE "pg_catalog"."default",
  "content" text COLLATE "pg_catalog"."default" NOT NULL,
  "md5" varchar(32) COLLATE "pg_catalog"."default",
  "gmt_create" timestamp(6) NOT NULL,
  "gmt_modified" timestamp(6) NOT NULL,
  "src_user" text COLLATE "pg_catalog"."default",
  "src_ip" varchar(50) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."config_info_tag"."id" IS 'id';
COMMENT ON COLUMN "public"."config_info_tag"."data_id" IS 'data_id';
COMMENT ON COLUMN "public"."config_info_tag"."group_id" IS 'group_id';
COMMENT ON COLUMN "public"."config_info_tag"."tenant_id" IS 'tenant_id';
COMMENT ON COLUMN "public"."config_info_tag"."tag_id" IS 'tag_id';
COMMENT ON COLUMN "public"."config_info_tag"."app_name" IS 'app_name';
COMMENT ON COLUMN "public"."config_info_tag"."content" IS 'content';
COMMENT ON COLUMN "public"."config_info_tag"."md5" IS 'md5';
COMMENT ON COLUMN "public"."config_info_tag"."gmt_create" IS '创建时间';
COMMENT ON COLUMN "public"."config_info_tag"."gmt_modified" IS '修改时间';
COMMENT ON COLUMN "public"."config_info_tag"."src_user" IS 'source user';
COMMENT ON COLUMN "public"."config_info_tag"."src_ip" IS 'source ip';
COMMENT ON TABLE "public"."config_info_tag" IS 'config_info_tag';

-- ----------------------------
-- Records of config_info_tag
-- ----------------------------

-- ----------------------------
-- Table structure for config_tags_relation
-- ----------------------------
DROP TABLE IF EXISTS "public"."config_tags_relation";
CREATE TABLE "public"."config_tags_relation" (
  "id" int8 NOT NULL,
  "tag_name" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
  "tag_type" varchar(64) COLLATE "pg_catalog"."default",
  "data_id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "group_id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
  "tenant_id" varchar(128) COLLATE "pg_catalog"."default",
  "nid" int8 NOT NULL
)
;
COMMENT ON COLUMN "public"."config_tags_relation"."id" IS 'id';
COMMENT ON COLUMN "public"."config_tags_relation"."tag_name" IS 'tag_name';
COMMENT ON COLUMN "public"."config_tags_relation"."tag_type" IS 'tag_type';
COMMENT ON COLUMN "public"."config_tags_relation"."data_id" IS 'data_id';
COMMENT ON COLUMN "public"."config_tags_relation"."group_id" IS 'group_id';
COMMENT ON COLUMN "public"."config_tags_relation"."tenant_id" IS 'tenant_id';
COMMENT ON COLUMN "public"."config_tags_relation"."nid" IS 'nid, 自增长标识';
COMMENT ON TABLE "public"."config_tags_relation" IS 'config_tag_relation';

-- ----------------------------
-- Records of config_tags_relation
-- ----------------------------

-- ----------------------------
-- Table structure for group_capacity
-- ----------------------------
DROP TABLE IF EXISTS "public"."group_capacity";
CREATE TABLE "public"."group_capacity" (
  "id" int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1
),
  "group_id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
  "quota" int8 NOT NULL,
  "usage" int8 NOT NULL,
  "max_size" int8 NOT NULL,
  "max_aggr_count" int8 NOT NULL,
  "max_aggr_size" int8 NOT NULL,
  "max_history_count" int8 NOT NULL,
  "gmt_create" timestamp(6) NOT NULL,
  "gmt_modified" timestamp(6) NOT NULL
)
;
COMMENT ON COLUMN "public"."group_capacity"."id" IS '主键ID';
COMMENT ON COLUMN "public"."group_capacity"."group_id" IS 'Group ID，空字符表示整个集群';
COMMENT ON COLUMN "public"."group_capacity"."quota" IS '配额，0表示使用默认值';
COMMENT ON COLUMN "public"."group_capacity"."usage" IS '使用量';
COMMENT ON COLUMN "public"."group_capacity"."max_size" IS '单个配置大小上限，单位为字节，0表示使用默认值';
COMMENT ON COLUMN "public"."group_capacity"."max_aggr_count" IS '聚合子配置最大个数，，0表示使用默认值';
COMMENT ON COLUMN "public"."group_capacity"."max_aggr_size" IS '单个聚合数据的子配置大小上限，单位为字节，0表示使用默认值';
COMMENT ON COLUMN "public"."group_capacity"."max_history_count" IS '最大变更历史数量';
COMMENT ON COLUMN "public"."group_capacity"."gmt_create" IS '创建时间';
COMMENT ON COLUMN "public"."group_capacity"."gmt_modified" IS '修改时间';
COMMENT ON TABLE "public"."group_capacity" IS '集群、各Group容量信息表';

-- ----------------------------
-- Records of group_capacity
-- ----------------------------

-- ----------------------------
-- Table structure for his_config_info
-- ----------------------------
DROP TABLE IF EXISTS "public"."his_config_info";
CREATE TABLE "public"."his_config_info" (
  "id" int8 NOT NULL,
  "nid" int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1
),
  "data_id" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
  "group_id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
  "app_name" varchar(128) COLLATE "pg_catalog"."default",
  "content" text COLLATE "pg_catalog"."default" NOT NULL,
  "md5" varchar(32) COLLATE "pg_catalog"."default",
  "gmt_create" timestamp(6) NOT NULL DEFAULT now(),
  "gmt_modified" timestamp(6) NOT NULL DEFAULT now(),
  "src_user" text COLLATE "pg_catalog"."default",
  "src_ip" varchar(50) COLLATE "pg_catalog"."default",
  "op_type" char(10) COLLATE "pg_catalog"."default",
  "tenant_id" varchar(128) COLLATE "pg_catalog"."default",
  "encrypted_data_key" varchar(1024) COLLATE "pg_catalog"."default" NOT NULL
)
;
COMMENT ON COLUMN "public"."his_config_info"."id" IS 'id';
COMMENT ON COLUMN "public"."his_config_info"."nid" IS 'nid, 自增标识';
COMMENT ON COLUMN "public"."his_config_info"."data_id" IS 'data_id';
COMMENT ON COLUMN "public"."his_config_info"."group_id" IS 'group_id';
COMMENT ON COLUMN "public"."his_config_info"."app_name" IS 'app_name';
COMMENT ON COLUMN "public"."his_config_info"."content" IS 'content';
COMMENT ON COLUMN "public"."his_config_info"."md5" IS 'md5';
COMMENT ON COLUMN "public"."his_config_info"."gmt_create" IS '创建时间';
COMMENT ON COLUMN "public"."his_config_info"."gmt_modified" IS '修改时间';
COMMENT ON COLUMN "public"."his_config_info"."src_user" IS 'source user';
COMMENT ON COLUMN "public"."his_config_info"."src_ip" IS 'source ip';
COMMENT ON COLUMN "public"."his_config_info"."op_type" IS 'operation type';
COMMENT ON COLUMN "public"."his_config_info"."tenant_id" IS '租户字段';
COMMENT ON COLUMN "public"."his_config_info"."encrypted_data_key" IS '密钥';
COMMENT ON TABLE "public"."his_config_info" IS '多租户改造';

-- ----------------------------
-- Records of his_config_info
-- ----------------------------
INSERT INTO "public"."his_config_info" VALUES (0, 3, 'gateway.yml', 'DEFAULT_GROUP', '', 'spring:
  cloud:
    gateway:
      discovery:
        locator:
          lowerCaseServiceId: true
          enabled: true
      routes:
        # 认证中心
        - id: auth
          uri: lb://auth
          predicates:
            - Path=/auth/**
          filters:
            # 验证码处理
            - CacheRequestFilter
            - ValidateCodeFilter
            - StripPrefix=1
        # 代码生成
        - id: gen-code
          uri: lb://gen-code
          predicates:
            - Path=/code/**
          filters:
            - StripPrefix=1
        # 定时任务
        - id: job
          uri: lb://job
          predicates:
            - Path=/schedule/**
          filters:
            - StripPrefix=1
        # 系统模块
        - id: system
          uri: lb://system
          predicates:
            - Path=/system/**
          filters:
            - StripPrefix=1
        # 文件服务
        - id: file
          uri: lb://file
          predicates:
            - Path=/file/**
          filters:
            - StripPrefix=1

# 安全配置
security:
  # 验证码
  captcha:
    enabled: true
    type: math
  # 防止XSS攻击
  xss:
    enabled: true
    excludeUrls:
      - /system/notice

  # 不校验白名单
  ignore:
    whites:
      - /auth/logout
      - /auth/login
      - /auth/register
      - /*/v2/api-docs
      - /*/v3/api-docs
      - /csrf

', '9c5ae85b1ec9d4e3edca54a12958bd41', '2024-10-21 19:42:29.936026', '2024-10-21 19:42:29.936', 'nacos', '172.70.100.1', 'I         ', 'ruoyi', '');
INSERT INTO "public"."his_config_info" VALUES (0, 4, 'file.yml', 'DEFAULT_GROUP', '', '# 本地文件上传
file:
    domain: http://127.0.0.1:9300
    path: D:/ruoyi/uploadPath
    prefix: /statics

# FastDFS配置
fdfs:
  domain: http://8.129.231.12
  soTimeout: 3000
  connectTimeout: 2000
  trackerList: 8.129.231.12:22122

# Minio配置
minio:
  url: http://127.0.0.1:9000
  accessKey: JWuj8ipa6Ns2To5nwF3S
  secretKey: sT6jIXUejLrSd8SeGFwWfHQkNAgMbuNMmycKCrvf
  bucketName: test', 'cf13137a1908752d11964817a832fcd4', '2024-10-21 19:42:31.845431', '2024-10-21 19:42:31.846', 'nacos', '172.70.100.1', 'I         ', 'ruoyi', '');
INSERT INTO "public"."his_config_info" VALUES (0, 5, 'application-dev.yml', 'DEFAULT_GROUP', '', 'spring:
  autoconfigure:
    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
  data:
    redis:
      host: ${REDIS_URL:127.0.0.1}
      port: ${REDIS_PORT:6379}
      password:
  datasource:
    # 单数据源模块使用（gen代码生成、job定时任务等模块）
    # driver-class-name: com.mysql.cj.jdbc.Driver
    # url: jdbc:mysql://${DB_URL:127.0.0.1}:${DB_PORT:3306}6/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai
    # username: ${DB_USERNAME:root}
    # password: ${DB_PASSWORD:123456}
    driver-class-name: org.postgresql.Driver
    url: jdbc:postgresql://${DB_URL:127.0.0.1}:${DB_PORT:5437}/ry-cloud?tcpKeepAlive=true&reWriteBatchedInserts=true
    username: ${DB_USERNAME:postgres}
    password: ${DB_PASSWORD:postgres}
    druid:
      stat-view-servlet:
        enabled: false
        # loginUsername: gitee
        # loginPassword: !@#456
    dynamic:
      druid:
        initial-size: 1
        min-idle: 2
        maxActive: 20
        maxWait: 60000
        connectTimeout: 30000
        socketTimeout: 60000
        timeBetweenEvictionRunsMillis: 60000
        minEvictableIdleTimeMillis: 300000
        validationQuery: SELECT 1
        testWhileIdle: true
        testOnBorrow: false
        testOnReturn: false
        poolPreparedStatements: true
        maxPoolPreparedStatementPerConnectionSize: 20
        filters: stat,slf4j
        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
      datasource:
          # 主库数据源
          master:
            # driver-class-name: com.mysql.cj.jdbc.Driver
            # url: jdbc:mysql://${DB_URL:127.0.0.1}:${DB_PORT:3306}6/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai
            # username: ${DB_USERNAME:root}
            # password: ${DB_PASSWORD:123456}
            driver-class-name: org.postgresql.Driver
            url: jdbc:postgresql://${DB_URL:127.0.0.1}:${DB_PORT:5437}/ry-cloud?tcpKeepAlive=true&reWriteBatchedInserts=true
            username: ${DB_USERNAME:postgres}
            password: ${DB_PASSWORD:postgres}
          # 从库数据源
          # slave:
            # username:
            # password:
            # url:
            # driver-class-name:

# mybatis-plus配置
mybatis-plus:
  type-aliases-package: com.ruoyi.**.domain
  configuration:
    auto-page-helper: true
    # 如果项目无日志框架，可以考虑指定为 org.apache.ibatis.logging.stdout.StdOutImpl (请勿在实际生产中使用).
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  global-config:
    db-config:
      # 主键类型
      # AUTO 数据库ID自增
      # NONE 空
      # INPUT 用户输入ID
      # ASSIGN_ID 雪花ID
      # ASSIGN_UUID 全局唯一ID UUID
      id-type: ASSIGN_ID

# logging:
#   level:
#     com.ruoyi.system.mapper: debug

# springdoc配置
springdoc:
  gatewayUrl: http://localhost:8080/${spring.application.name}
  api-docs:
    # 是否开启接口文档
    enabled: true
  info:
    # 标题
    title: ''系统模块接口文档''
    # 描述
    description: ''系统模块接口描述''
    # 作者信息
    contact:
      name: gitee
      url: https://www.gitee.com



# feign 配置
feign:
  sentinel:
    enabled: true
  okhttp:
    enabled: true
  httpclient:
    enabled: false
  client:
    config:
      default:
        connectTimeout: 10000
        readTimeout: 10000
  compression:
    request:
      enabled: true
      min-request-size: 8192
    response:
      enabled: true

# 暴露监控端点
management:
  endpoints:
    web:
      exposure:
        include: ''*''
', 'e2db9bdd1047d75cdfbdf10ae2e793af', '2024-10-21 19:42:32.296691', '2024-10-21 19:42:32.298', 'nacos', '172.70.100.1', 'I         ', 'ruoyi', '');
INSERT INTO "public"."his_config_info" VALUES (0, 6, 'sentinel-gateway', 'DEFAULT_GROUP', '', '[
    {
        "resource": "auth",
        "count": 500,
        "grade": 1,
        "limitApp": "default",
        "strategy": 0,
        "controlBehavior": 0
    },
	{
        "resource": "system",
        "count": 1000,
        "grade": 1,
        "limitApp": "default",
        "strategy": 0,
        "controlBehavior": 0
    },
	{
        "resource": "gen-code",
        "count": 200,
        "grade": 1,
        "limitApp": "default",
        "strategy": 0,
        "controlBehavior": 0
    },
	{
        "resource": "job",
        "count": 300,
        "grade": 1,
        "limitApp": "default",
        "strategy": 0,
        "controlBehavior": 0
    }
]', '33d87a8946b8d3a0f51a9c9e08594c7e', '2024-10-21 19:42:33.027041', '2024-10-21 19:42:33.028', 'nacos', '172.70.100.1', 'I         ', 'ruoyi', '');
INSERT INTO "public"."his_config_info" VALUES (19, 7, 'application-dev.yml', 'DEFAULT_GROUP', '', 'spring:
  autoconfigure:
    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
  data:
    redis:
      host: ${REDIS_URL:127.0.0.1}
      port: ${REDIS_PORT:6379}
      password:
  datasource:
    # 单数据源模块使用（gen代码生成、job定时任务等模块）
    # driver-class-name: com.mysql.cj.jdbc.Driver
    # url: jdbc:mysql://${DB_URL:127.0.0.1}:${DB_PORT:3306}6/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai
    # username: ${DB_USERNAME:root}
    # password: ${DB_PASSWORD:123456}
    driver-class-name: org.postgresql.Driver
    url: jdbc:postgresql://${DB_URL:127.0.0.1}:${DB_PORT:5437}/ry-cloud?tcpKeepAlive=true&reWriteBatchedInserts=true
    username: ${DB_USERNAME:postgres}
    password: ${DB_PASSWORD:postgres}
    druid:
      stat-view-servlet:
        enabled: false
        # loginUsername: gitee
        # loginPassword: !@#456
    dynamic:
      druid:
        initial-size: 1
        min-idle: 2
        maxActive: 20
        maxWait: 60000
        connectTimeout: 30000
        socketTimeout: 60000
        timeBetweenEvictionRunsMillis: 60000
        minEvictableIdleTimeMillis: 300000
        validationQuery: SELECT 1
        testWhileIdle: true
        testOnBorrow: false
        testOnReturn: false
        poolPreparedStatements: true
        maxPoolPreparedStatementPerConnectionSize: 20
        filters: stat,slf4j
        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
      datasource:
          # 主库数据源
          master:
            # driver-class-name: com.mysql.cj.jdbc.Driver
            # url: jdbc:mysql://${DB_URL:127.0.0.1}:${DB_PORT:3306}6/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai
            # username: ${DB_USERNAME:root}
            # password: ${DB_PASSWORD:123456}
            driver-class-name: org.postgresql.Driver
            url: jdbc:postgresql://${DB_URL:127.0.0.1}:${DB_PORT:5437}/ry-cloud?tcpKeepAlive=true&reWriteBatchedInserts=true
            username: ${DB_USERNAME:postgres}
            password: ${DB_PASSWORD:postgres}
          # 从库数据源
          # slave:
            # username:
            # password:
            # url:
            # driver-class-name:

# mybatis-plus配置
mybatis-plus:
  type-aliases-package: com.ruoyi.**.domain
  configuration:
    auto-page-helper: true
    # 如果项目无日志框架，可以考虑指定为 org.apache.ibatis.logging.stdout.StdOutImpl (请勿在实际生产中使用).
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  global-config:
    db-config:
      # 主键类型
      # AUTO 数据库ID自增
      # NONE 空
      # INPUT 用户输入ID
      # ASSIGN_ID 雪花ID
      # ASSIGN_UUID 全局唯一ID UUID
      id-type: ASSIGN_ID

# logging:
#   level:
#     com.ruoyi.system.mapper: debug

# springdoc配置
springdoc:
  gatewayUrl: http://localhost:8080/${spring.application.name}
  api-docs:
    # 是否开启接口文档
    enabled: true
  info:
    # 标题
    title: ''系统模块接口文档''
    # 描述
    description: ''系统模块接口描述''
    # 作者信息
    contact:
      name: gitee
      url: https://www.gitee.com



# feign 配置
feign:
  sentinel:
    enabled: true
  okhttp:
    enabled: true
  httpclient:
    enabled: false
  client:
    config:
      default:
        connectTimeout: 10000
        readTimeout: 10000
  compression:
    request:
      enabled: true
      min-request-size: 8192
    response:
      enabled: true

# 暴露监控端点
management:
  endpoints:
    web:
      exposure:
        include: ''*''
', 'e2db9bdd1047d75cdfbdf10ae2e793af', '2024-10-21 19:42:42.517023', '2024-10-21 19:42:42.522', 'nacos', '172.70.100.1', 'U         ', 'ruoyi', '');
INSERT INTO "public"."his_config_info" VALUES (18, 8, 'file.yml', 'DEFAULT_GROUP', '', '# 本地文件上传
file:
    domain: http://127.0.0.1:9300
    path: D:/ruoyi/uploadPath
    prefix: /statics

# FastDFS配置
fdfs:
  domain: http://8.129.231.12
  soTimeout: 3000
  connectTimeout: 2000
  trackerList: 8.129.231.12:22122

# Minio配置
minio:
  url: http://127.0.0.1:9000
  accessKey: JWuj8ipa6Ns2To5nwF3S
  secretKey: sT6jIXUejLrSd8SeGFwWfHQkNAgMbuNMmycKCrvf
  bucketName: test', 'cf13137a1908752d11964817a832fcd4', '2024-10-21 19:42:50.952794', '2024-10-21 19:42:50.955', 'nacos', '172.70.100.1', 'U         ', 'ruoyi', '');
INSERT INTO "public"."his_config_info" VALUES (19, 9, 'application-dev.yml', 'DEFAULT_GROUP', '', 'spring:
  autoconfigure:
    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
  data:
    redis:
      host: ${REDIS_URL:127.0.0.1}
      port: ${REDIS_PORT:6379}
      password:
  datasource:
    # 单数据源模块使用（gen代码生成、job定时任务等模块）
    # driver-class-name: com.mysql.cj.jdbc.Driver
    # url: jdbc:mysql://${DB_URL:127.0.0.1}:${DB_PORT:3306}6/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai
    # username: ${DB_USERNAME:root}
    # password: ${DB_PASSWORD:123456}
    driver-class-name: org.postgresql.Driver
    url: jdbc:postgresql://${DB_URL:127.0.0.1}:${DB_PORT:5437}/ry-cloud?tcpKeepAlive=true&reWriteBatchedInserts=true
    username: ${DB_USERNAME:postgres}
    password: ${DB_PASSWORD:postgres}
    druid:
      stat-view-servlet:
        enabled: false
        # loginUsername: gitee
        # loginPassword: !@#456
    dynamic:
      druid:
        initial-size: 1
        min-idle: 2
        maxActive: 20
        maxWait: 60000
        connectTimeout: 30000
        socketTimeout: 60000
        timeBetweenEvictionRunsMillis: 60000
        minEvictableIdleTimeMillis: 300000
        validationQuery: SELECT 1
        testWhileIdle: true
        testOnBorrow: false
        testOnReturn: false
        poolPreparedStatements: true
        maxPoolPreparedStatementPerConnectionSize: 20
        filters: stat,slf4j
        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
      datasource:
          # 主库数据源
          master:
            # driver-class-name: com.mysql.cj.jdbc.Driver
            # url: jdbc:mysql://${DB_URL:127.0.0.1}:${DB_PORT:3306}6/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai
            # username: ${DB_USERNAME:root}
            # password: ${DB_PASSWORD:123456}
            driver-class-name: org.postgresql.Driver
            url: jdbc:postgresql://${DB_URL:127.0.0.1}:${DB_PORT:5437}/ry-cloud?tcpKeepAlive=true&reWriteBatchedInserts=true
            username: ${DB_USERNAME:postgres}
            password: ${DB_PASSWORD:postgres}
          # 从库数据源
          # slave:
            # username:
            # password:
            # url:
            # driver-class-name:

# mybatis-plus配置
mybatis-plus:
  type-aliases-package: com.ruoyi.**.domain
  configuration:
    auto-page-helper: true
    # 如果项目无日志框架，可以考虑指定为 org.apache.ibatis.logging.stdout.StdOutImpl (请勿在实际生产中使用).
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  global-config:
    db-config:
      # 主键类型
      # AUTO 数据库ID自增
      # NONE 空
      # INPUT 用户输入ID
      # ASSIGN_ID 雪花ID
      # ASSIGN_UUID 全局唯一ID UUID
      id-type: ASSIGN_ID

# logging:
#   level:
#     com.ruoyi.system.mapper: debug

# springdoc配置
springdoc:
  gatewayUrl: http://localhost:8080/${spring.application.name}
  api-docs:
    # 是否开启接口文档
    enabled: true
  info:
    # 标题
    title: ''系统模块接口文档''
    # 描述
    description: ''系统模块接口描述''
    # 作者信息
    contact:
      name: gitee
      url: https://www.gitee.com



# feign 配置
feign:
  sentinel:
    enabled: true
  okhttp:
    enabled: true
  httpclient:
    enabled: false
  client:
    config:
      default:
        connectTimeout: 10000
        readTimeout: 10000
  compression:
    request:
      enabled: true
      min-request-size: 8192
    response:
      enabled: true

# 暴露监控端点
management:
  endpoints:
    web:
      exposure:
        include: ''*''
', 'e2db9bdd1047d75cdfbdf10ae2e793af', '2024-10-21 19:43:02.034653', '2024-10-21 19:43:02.037', 'nacos', '172.70.100.1', 'U         ', 'ruoyi', '');

-- ----------------------------
-- Table structure for permissions
-- ----------------------------
DROP TABLE IF EXISTS "public"."permissions";
CREATE TABLE "public"."permissions" (
  "role" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "resource" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
  "action" varchar(8) COLLATE "pg_catalog"."default" NOT NULL
)
;
COMMENT ON COLUMN "public"."permissions"."role" IS 'role';
COMMENT ON COLUMN "public"."permissions"."resource" IS 'resource';
COMMENT ON COLUMN "public"."permissions"."action" IS 'action';

-- ----------------------------
-- Records of permissions
-- ----------------------------

-- ----------------------------
-- Table structure for roles
-- ----------------------------
DROP TABLE IF EXISTS "public"."roles";
CREATE TABLE "public"."roles" (
  "username" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "role" varchar(50) COLLATE "pg_catalog"."default" NOT NULL
)
;
COMMENT ON COLUMN "public"."roles"."username" IS 'username';
COMMENT ON COLUMN "public"."roles"."role" IS 'role';

-- ----------------------------
-- Records of roles
-- ----------------------------
INSERT INTO "public"."roles" VALUES ('nacos', 'ROLE_ADMIN');

-- ----------------------------
-- Table structure for tenant_capacity
-- ----------------------------
DROP TABLE IF EXISTS "public"."tenant_capacity";
CREATE TABLE "public"."tenant_capacity" (
  "id" int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1
),
  "tenant_id" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
  "quota" int8 NOT NULL,
  "usage" int8 NOT NULL,
  "max_size" int8 NOT NULL,
  "max_aggr_count" int8 NOT NULL,
  "max_aggr_size" int8 NOT NULL,
  "max_history_count" int8 NOT NULL,
  "gmt_create" timestamp(6) NOT NULL,
  "gmt_modified" timestamp(6) NOT NULL
)
;
COMMENT ON COLUMN "public"."tenant_capacity"."id" IS '主键ID';
COMMENT ON COLUMN "public"."tenant_capacity"."tenant_id" IS 'Tenant ID';
COMMENT ON COLUMN "public"."tenant_capacity"."quota" IS '配额，0表示使用默认值';
COMMENT ON COLUMN "public"."tenant_capacity"."usage" IS '使用量';
COMMENT ON COLUMN "public"."tenant_capacity"."max_size" IS '单个配置大小上限，单位为字节，0表示使用默认值';
COMMENT ON COLUMN "public"."tenant_capacity"."max_aggr_count" IS '聚合子配置最大个数';
COMMENT ON COLUMN "public"."tenant_capacity"."max_aggr_size" IS '单个聚合数据的子配置大小上限，单位为字节，0表示使用默认值';
COMMENT ON COLUMN "public"."tenant_capacity"."max_history_count" IS '最大变更历史数量';
COMMENT ON COLUMN "public"."tenant_capacity"."gmt_create" IS '创建时间';
COMMENT ON COLUMN "public"."tenant_capacity"."gmt_modified" IS '修改时间';
COMMENT ON TABLE "public"."tenant_capacity" IS '租户容量信息表';

-- ----------------------------
-- Records of tenant_capacity
-- ----------------------------

-- ----------------------------
-- Table structure for tenant_info
-- ----------------------------
DROP TABLE IF EXISTS "public"."tenant_info";
CREATE TABLE "public"."tenant_info" (
  "id" int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1
MINVALUE  1
MAXVALUE 9223372036854775807
START 1
CACHE 1
),
  "kp" varchar(128) COLLATE "pg_catalog"."default" NOT NULL,
  "tenant_id" varchar(128) COLLATE "pg_catalog"."default",
  "tenant_name" varchar(128) COLLATE "pg_catalog"."default",
  "tenant_desc" varchar(256) COLLATE "pg_catalog"."default",
  "create_source" varchar(32) COLLATE "pg_catalog"."default",
  "gmt_create" int8 NOT NULL,
  "gmt_modified" int8 NOT NULL
)
;
COMMENT ON COLUMN "public"."tenant_info"."id" IS 'id';
COMMENT ON COLUMN "public"."tenant_info"."kp" IS 'kp';
COMMENT ON COLUMN "public"."tenant_info"."tenant_id" IS 'tenant_id';
COMMENT ON COLUMN "public"."tenant_info"."tenant_name" IS 'tenant_name';
COMMENT ON COLUMN "public"."tenant_info"."tenant_desc" IS 'tenant_desc';
COMMENT ON COLUMN "public"."tenant_info"."create_source" IS 'create_source';
COMMENT ON COLUMN "public"."tenant_info"."gmt_create" IS '创建时间';
COMMENT ON COLUMN "public"."tenant_info"."gmt_modified" IS '修改时间';
COMMENT ON TABLE "public"."tenant_info" IS 'tenant_info';

-- ----------------------------
-- Records of tenant_info
-- ----------------------------
INSERT INTO "public"."tenant_info" VALUES (1, '1', 'ruoyi', 'ruoyi', 'ruoyi', 'nacos', 1729510473757, 1729510473757);

-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS "public"."users";
CREATE TABLE "public"."users" (
  "username" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "password" varchar(500) COLLATE "pg_catalog"."default" NOT NULL,
  "enabled" bool NOT NULL
)
;
COMMENT ON COLUMN "public"."users"."username" IS 'username';
COMMENT ON COLUMN "public"."users"."password" IS 'password';
COMMENT ON COLUMN "public"."users"."enabled" IS 'enabled';

-- ----------------------------
-- Records of users
-- ----------------------------
INSERT INTO "public"."users" VALUES ('nacos', '$2a$10$dNqG3x2OXWjENBjhYFIlfO8LfLFL8DEP5QaM4o.ifPm5NJHe/ejOa', 'f');

-- ----------------------------
-- Auto increment value for config_info
-- ----------------------------
SELECT setval('"public"."config_info_id_seq"', 20, true);

-- ----------------------------
-- Indexes structure for table config_info
-- ----------------------------
CREATE UNIQUE INDEX "uk_configinfo_datagrouptenant" ON "public"."config_info" USING btree (
  "data_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "group_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "tenant_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table config_info
-- ----------------------------
ALTER TABLE "public"."config_info" ADD CONSTRAINT "config_info_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Auto increment value for config_info_aggr
-- ----------------------------
SELECT setval('"public"."config_info_aggr_id_seq"', 1, false);

-- ----------------------------
-- Indexes structure for table config_info_aggr
-- ----------------------------
CREATE UNIQUE INDEX "uk_configinfoaggr_datagrouptenantdatum" ON "public"."config_info_aggr" USING btree (
  "data_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "group_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "tenant_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "datum_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table config_info_aggr
-- ----------------------------
ALTER TABLE "public"."config_info_aggr" ADD CONSTRAINT "config_info_aggr_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Auto increment value for config_info_beta
-- ----------------------------
SELECT setval('"public"."config_info_beta_id_seq"', 1, false);

-- ----------------------------
-- Indexes structure for table config_info_beta
-- ----------------------------
CREATE UNIQUE INDEX "uk_configinfobeta_datagrouptenant" ON "public"."config_info_beta" USING btree (
  "data_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "group_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "tenant_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table config_info_beta
-- ----------------------------
ALTER TABLE "public"."config_info_beta" ADD CONSTRAINT "config_info_beta_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Auto increment value for config_info_tag
-- ----------------------------
SELECT setval('"public"."config_info_tag_id_seq"', 1, false);

-- ----------------------------
-- Indexes structure for table config_info_tag
-- ----------------------------
CREATE UNIQUE INDEX "uk_configinfotag_datagrouptenanttag" ON "public"."config_info_tag" USING btree (
  "data_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "group_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "tenant_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "tag_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table config_info_tag
-- ----------------------------
ALTER TABLE "public"."config_info_tag" ADD CONSTRAINT "config_info_tag_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Indexes structure for table config_tags_relation
-- ----------------------------
CREATE INDEX "idx_tenant_id" ON "public"."config_tags_relation" USING btree (
  "tenant_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);
CREATE UNIQUE INDEX "uk_configtagrelation_configidtag" ON "public"."config_tags_relation" USING btree (
  "id" "pg_catalog"."int8_ops" ASC NULLS LAST,
  "tag_name" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "tag_type" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table config_tags_relation
-- ----------------------------
ALTER TABLE "public"."config_tags_relation" ADD CONSTRAINT "config_tags_relation_pkey" PRIMARY KEY ("nid");

-- ----------------------------
-- Auto increment value for group_capacity
-- ----------------------------
SELECT setval('"public"."group_capacity_id_seq"', 1, false);

-- ----------------------------
-- Indexes structure for table group_capacity
-- ----------------------------
CREATE UNIQUE INDEX "uk_group_id" ON "public"."group_capacity" USING btree (
  "group_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table group_capacity
-- ----------------------------
ALTER TABLE "public"."group_capacity" ADD CONSTRAINT "group_capacity_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Auto increment value for his_config_info
-- ----------------------------
SELECT setval('"public"."his_config_info_nid_seq"', 9, true);

-- ----------------------------
-- Indexes structure for table his_config_info
-- ----------------------------
CREATE INDEX "idx_did" ON "public"."his_config_info" USING btree (
  "data_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);
CREATE INDEX "idx_gmt_create" ON "public"."his_config_info" USING btree (
  "gmt_create" "pg_catalog"."timestamp_ops" ASC NULLS LAST
);
CREATE INDEX "idx_gmt_modified" ON "public"."his_config_info" USING btree (
  "gmt_modified" "pg_catalog"."timestamp_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table his_config_info
-- ----------------------------
ALTER TABLE "public"."his_config_info" ADD CONSTRAINT "his_config_info_pkey" PRIMARY KEY ("nid");

-- ----------------------------
-- Indexes structure for table permissions
-- ----------------------------
CREATE UNIQUE INDEX "uk_role_permission" ON "public"."permissions" USING btree (
  "role" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "resource" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "action" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Indexes structure for table roles
-- ----------------------------
CREATE UNIQUE INDEX "idx_user_role" ON "public"."roles" USING btree (
  "username" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "role" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Auto increment value for tenant_capacity
-- ----------------------------
SELECT setval('"public"."tenant_capacity_id_seq"', 1, false);

-- ----------------------------
-- Indexes structure for table tenant_capacity
-- ----------------------------
CREATE UNIQUE INDEX "uk_tenant_id" ON "public"."tenant_capacity" USING btree (
  "tenant_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table tenant_capacity
-- ----------------------------
ALTER TABLE "public"."tenant_capacity" ADD CONSTRAINT "tenant_capacity_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Auto increment value for tenant_info
-- ----------------------------
SELECT setval('"public"."tenant_info_id_seq"', 1, true);

-- ----------------------------
-- Indexes structure for table tenant_info
-- ----------------------------
CREATE UNIQUE INDEX "uk_tenant_info_kptenantid" ON "public"."tenant_info" USING btree (
  "kp" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "tenant_id" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table tenant_info
-- ----------------------------
ALTER TABLE "public"."tenant_info" ADD CONSTRAINT "tenant_info_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table users
-- ----------------------------
ALTER TABLE "public"."users" ADD CONSTRAINT "users_pkey" PRIMARY KEY ("username");

CREATE OR REPLACE FUNCTION "public"."now"("arg" int4=1)
  RETURNS "pg_catalog"."timestamp" AS $BODY$BEGIN
  -- Routine body goes here...

  RETURN now();
END
$BODY$
  LANGUAGE plpgsql VOLATILE
  COST 100
